-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the containerV2
flag to compute initial heap percentage using processor count, and disable setting the ActiveProcessorCount
JVM option
#361
Conversation
…ap percentage to be max(50%, (75%*heap - 3*numProcessors)/heap)
Generate changelog in
|
UseProcessorAwareInitialHeapPercentage
flag to compute initial heap percentage using processor count, and disable setting the ActiveProcessorCount
JVM optionUseProcessorAwareInitialHeapSize
flag to compute initial heap percentage using processor count, and disable setting the ActiveProcessorCount
JVM option
integration_test/testdata/launcher-custom-experimental-processor-aware-heap-pct-flag.yml
Outdated
Show resolved
Hide resolved
Converting back to draft. I'd like to add a test. |
…ct' of github.com:palantir/go-java-launcher into pmarupaka/updateActiveProcessorCountFlagAndInitialHeapPct
[skip ci]
…itial/max ram percentage when memory.limit_in_bytes is not present
experimentalContainerV2
flag to compute initial heap percentage using processor count, and disable setting the ActiveProcessorCount
JVM optioncontainerV2
flag to compute initial heap percentage using processor count, and disable setting the ActiveProcessorCount
JVM option
… invocation after a flag check
README.md
Outdated
``-XX:MaxRAMPercentage=`` nor ``-XX:InitialRAMPercentage=`` prefixes are present in either static or custom jvm opts, | ||
``-Xmx|-Xms`` will both be set to be 75% of the heap size minus 3mb per processor, with a minimum value of 50% of the | ||
heap. | ||
1. If neither ``-XX:MaxRAMPercentage=`` nor ``-XX:InitialRAMPercentage=`` prefixes are present in either static or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to clarify that this case only applies when cgroup memory limits aren't detected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may also be fair to exclude the fallback info from the documentation as it shouldn't be reachable in rubix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated it to specify that the fallback is used when we're not able to get the cgroup memory limit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
👍 |
Released 1.93.0 |
Before this PR
This is part of a larger effort in improving stability of Java services in Rubix.
-XX:ActiveProcessorCount
k8s resource requests provide a minimum bound on resource usage. The
-XX:ActiveProcessorCount
JVM option acts as an upper bound on resource usage in several internal JDK features (e.g. GC threads, compiler threads). We currently set the active processor count based on resource requests. This has led to unpredictable performance under load.Setting initial heap size to be aware of the number of processors
From the above change, we're no longer limiting the number of processors available to the JVM. In the past, when we've removed limits on the number of processors (due to JDK-8281181 being released in a critical patch update), we've encountered several OOM exceptions. This PR allocates 3mb per processor, by removing that much from the heap size. The rough 3mb figure was obtained by observation (cc: @carterkozak).
After this PR
==COMMIT_MSG==
When the experimental
containerV2
is set, 1) compute the heap percentage as 75% of the heap minus 3mb per processor, with a minimum value of 50%, and 2) don't set the-XX:ActiveProcessorCount
JVM option.==COMMIT_MSG==
Possible downsides?
This change will potentially waste available memory for services which would benefit from larger heap sizes. Also, the heap size heuristic is simple; a more sophisticated solution would allow for better heap utilization (see #323).